﻿using SharePhone.Common.List;
//using SharePhone.Search;

//using SharePhone.UserProfileService;

namespace SharePhone.Common.Web
{
    public class SPWeb
    {
        private SPWebCollection webs;

        public SPWeb(string url)
        {
            Url = url;
            Lists = new SPListCollection(this);
        }

        internal ContextSettings Settings { get; set; }

        /// <summary>
        /// Enumerating this list will cause a web service call. <br/>
        /// To get the proper generic list, call Lists.GetListByName(..) directly.
        /// </summary>
        public SPListCollection Lists { get; private set; }

        public SPWebCollection Webs
        {
            get
            {
                if (webs == null)
                    webs = new SPWebCollection(Url, Settings);
                return webs;
            }
            private set { webs = value; }
        }


        public string Title { get; set; }
        public string Description { get; set; }
        public string Language { get; set; }
        public string Theme { get; set; }
        public string Url { get; set; }

        public void Update()
        {
            //TODO: implement
        }
    }
}